package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingPlan;
import com.zzyl.entity.NursingProjectPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Mapper;
import com.zzyl.vo.NursingProjectPlanVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
    /**
 * @Description NursingMapper
 * @Author wangwei
 * @Date 2024-08-23
 */
@Mapper
public interface NursingPlanMapper {

        /**
         * 插入护理计划
         */
        void insertNuringPlan(NursingPlan nursingPlan);

        /**
         * 插入护理计划和项目关联表
         */
        void insertNuringProject(List<NursingProjectPlan> aimProjectPlanList);

        /**
         * 获取分页的结果
         */
        Page<NursingPlanVo> getPage(String name, Integer status);
    /**
     * 查询所有的护理计划
     * @return
     */
    List<NursingPlanVo> getAllNursingPlan();

    /**
     * 添加项目计划中间表信息
     * @param projectPlans
     * @return
     */
    void addNPPInfo(List<NursingProjectPlan> projectPlans);

    /**
     * 根据ID回显信息
     *
     * @param id
     * @return
     */
    NursingPlanVo getInfoByID(Integer id);

    /**
     * 删除项目计划中间表
     * @param id
     */
    void deleteProjectPlan(Long id);

    /**
     * 更新计划信息
     * @param nursingPlan
     */
    void updatePlanInfo(NursingPlan nursingPlan);

    /**
     * 根据id删除护理计划
     *
     * @param id
     * @return
     */
    void deletePlanById(Integer id);
    /**
     * 根据ID更改计划状态
     *
     * @param id
     * @param status
     * @return
     */
    void updateStatus(@Param("id") Integer id, @Param("status") Integer status);
}
